<?php include "../../../include/php/header.php"; ?>
<center>
<table width="800" border="0" cellpadding="0" cellspacing="0">
  <tr>
  <td colspan="2">
  		<div class="texto_bienvenida cizq">
		Bienvenido, <?=$objeto->obtenerUsuario();?><br/>
    </div>
    <div class="texto_encabezado cder">
     	<div class="tab cizq">
	    <a href="../../index.php">Panel Principal</a>
	    </div>
	    <div class="tab cizq">
	    <a href="index.php">Panel Boletin</a>
		</div>
	    <div class="tab cizq">
	    <a href="../../../include/<?=$objeto->cerrar_s()?>" class="menu">Cerrar Sesi&oacute;n</a>    
	    </div>
    </div>
    <div class="sep"></div>
  </td>
  </tr>
</table>
<table width="800" border="0" cellpadding="0" cellspacing="0">
<tr>
  <td valign="baseline" bgcolor="#FFFFFF" class="Estilo78" scope="col">
  <div align="center" style="margin:6px 0 6px 0;">		
  <!-- standard page header -->
  <?php
  $sql_t = "SELECT * FROM boletin WHERE id_boletin =".$_GET['id'];
  $res_t = $db->exec_cons($sql_t);
  $resultados = mysql_fetch_array($res_t); 	
	?>
    <form id="formEditar">
	<table cellspacing="5" cellpadding="5">
	<tr>
	  <td colspan="2" align="left" valign="middle" class="celda_form" style="background-color:#333333">
	    Editar bolet&iacute;n actual</td>
	  </tr>
	<tr>
	<td align="left" valign="top" style="background-color:#9CBADE" class="celda_form">Nombre</td>
	<td align="left" style="background-color:#9CBADE">
	<input type="hidden" name="id" value="<?php echo $_GET['id']; ?>">
   	<input size="75" maxlength="500"  type="text" name="cjNombre" value="<?php echo $resultados['nombre']; ?>">	</td>
	</tr>
	<tr>
	<td align="left" valign="top" style="background-color:#9CBADE" class="celda_form">Contenido</td>
	<td align="left" style="background-color:#9CBADE">
	<textarea name="cjContenido" cols="75" rows="20"><?php echo $resultados['contenido']; ?>
    </textarea>
    </td>
	</tr>
	<tr>
	  <td align="left" valign="top" style="background-color:#9CBADE" class="celda_form">Idioma</td>
	  <td align="left" style="background-color:#9CBADE">
      <select name="cbIdioma" id="cbIdioma"  title="cat_acti.inc.php">
      <option value="-1">Seleccione Idioma</option>
      <?php
	  $sql = "SELECT * FROM idiomas";
	  $res = $db->exec_cons($sql);
	  while($resul = mysql_fetch_array($res)){
		if($resul["codigo"] == $resultados['idioma']){
	  ?>
       		<option value="<?=$resultados["idioma"]?>" selected><?=$resul["nombre"]?></option>
      <?php
		}else{
	  ?>
			<option value="<?=$resul["codigo"]?>"><?=$resul["nombre"]?></option>	
	  <?php 
		}
 	  }
	  ?>
      </select>      </td>
	  </tr>
	<tr>
	  <td align="left" valign="top" style="background-color:#9CBADE" class="celda_form">Fecha Creaci&oacute;n</td>
	  <td align="left" style="background-color:#9CBADE">
      <input size="50" maxlength="250" type="text" name="cjFechaC" id="FechaC" value="<?php echo $resultados['fecha_c']; ?>"><button id="FC">...</button>
      <script type="text/javascript">
  		 Calendar.setup(
  		    	  {
  		      		inputField  : "FechaC",         // ID of the input field
  		      		ifFormat    : "%Y-%m-%d",    // the date format
  		      		button      : "FC"       // ID of the button
  		    	  }
  		 );
	  </script> 
      </td>
      </tr>
	<tr>
	<td align="left" valign="top" style="background-color:#9CBADE" class="celda_form">Fecha Lanzamiento</td>
	<td align="left" style="background-color:#9CBADE">
	<input size="50" maxlength="250" type="text" name="cjFechaL" id="FechaL" value="<?php echo $resultados['fecha_l']; ?>"><button id="FL">...</button>
	<script type="text/javascript">
  		  Calendar.setup(
    	  {
      		inputField  : "FechaL",         // ID of the input field
      		ifFormat    : "%Y-%m-%d",    // the date format
      		button      : "FL"       // ID of the button
    	  }
  		  );
    </script>
    </td>
	</tr>
	<tr>
	<td colspan="2" class="linea">
    <div class="cizq" id="status"></div>
    <div class="cder">
    <input type="button" name="btEditar" id="btEditar" value="Editar Bolet&iacute;n" alt="editar_boletin.inc.php" title="1">
    </div>
    <div class="sep"></div>  
    </td>
	</tr>
	</table>
    </form>
    <?php
		mysql_close($db->obtenerConexion()); //Cerramos la conexion
    ?>	
  </div>
  </td>
</tr>
<tr><td class="celda_pie">&nbsp;</td></tr>
</table>
</center>
<?php include "../../../include/php/footer.php"; ?>
